import request from "@/utils/request";

export function getThirdPartys(paramters) {
  return request({
    url: "api/v1/thirdpartys",
    method: "get",
    params: paramters,
    authServer: false,
  });
}

export function getAllThirdPartys() {
  return request({
    url: "api/v1/thirdpartys/all",
    method: "get",
    authServer: false,
  });
}

export function getThirdParty(id) {
  return request({
    url: "api/v1/thirdpartys/"+id,
    method: "get",
    authServer: false,
  });
}

export function addThirdParty(data) {
  return request({
    url: "api/v1/thirdpartys",
    method: "post",
    data: data,
    authServer: false,
  });
}

export function updateThirdParty(data) {
  return request({
    url: "api/v1/thirdpartys",
    method: "put",
    data: data,
    authServer: false,
  });
}

export function deleteThirdParty(id) {
  return request({
    url: "api/v1/thirdpartys/" + id,
    method: "delete",
    authServer: false,
  });
}